package cn.jeeweb.web.modules.equipment.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.jeeweb.common.annotate.UiPropertyField;
import cn.jeeweb.common.flag.ObjectMark;
import cn.jeeweb.common.mvc.entity.DataEntity;
import cn.jeeweb.web.modules.sys.entity.User;
import cn.xjzn.framework_Core.ControlType;
import cn.xjzn.framework_Core.DataType;
import cn.xjzn.framework_Core.ModuleServe;
import cn.xjzn.framework_Core.StaticControl;
import com.baomidou.mybatisplus.annotations.TableField;

import java.util.Date;
import java.util.List;

/**
 * Created by DELL on 2019/11/19.
 */
public class EqsRepair  extends DataEntity<String> implements ObjectMark {

    @TableField(value = "code")
    @Excel(name = "维修编号", orderNum = "0", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairModule,propertyName = "code",codeConfig = "RPAUTOCODE",labelText="维修编号",displayPosition = 1)
    private String code;
    @TableField(value = "requisitionId")
    @Excel(name = "报修单id", orderNum = "1", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairModule,propertyName = "id",aliasName = "requisitionId",labelText="报修单id",isReference = 1,ownerPropertyName = "eqsRepairRequistion",referenceModuleId = ModuleServe.eqsRepairRequistionModule,displayPosition = 2)
    private String requisitionId;
    @TableField(value = "receiverId")
    @Excel(name = "接收人id", orderNum = "2", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairModule,propertyName = "id",aliasName = "receiverId",labelText="接收人id",isReference = 1,ownerPropertyName = "receiver",referenceModuleId = ModuleServe.personModule,displayPosition = 3)
    private String receiverId;
    @TableField(value = "receiveTime")
    @Excel(name = "接收报修时间", orderNum = "3", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairModule,propertyName = "receiveTime",labelText="接收报修时间",displayPosition = 4,staticControl = StaticControl.DATESTATICCONTROL)
    private Date receiveTime;
    @TableField(value = "status")
    @UiPropertyField(moduleId = ModuleServe.eqsRepairModule,propertyName = "status",labelText="状态",displayPosition = 5,controlType = ControlType.DICTSELECTCONTROL,dictCode = "orderStatus")
    private String status;
    @TableField(value = "confirmFinshTime")
    @Excel(name = "确认完成时间", orderNum = "4", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairModule,propertyName = "confirmFinshTime",labelText="确认完成时间",displayPosition = 6,staticControl = StaticControl.DATESTATICCONTROL)
    private Date confirmFinshTime;
    @TableField(value = "confirmerId")
    @Excel(name = "确认人id", orderNum = "5", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairModule,propertyName = "confirmerId",aliasName = "id",labelText="确认人id",isReference = 1,ownerPropertyName = "confirmer",referenceModuleId = ModuleServe.personModule,displayPosition = 7)
    private String confirmerId;

    @TableField(exist = false)
    private EqsRepairRequistion eqsRepairRequistion;

    @TableField(exist = false)
    private User receiver;

    @TableField(exist = false)
    private User confirmer;

    @TableField(exist = false)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairModule,propertyName = "eqsRepairPersonnelworkList",ownerPropertyName = "eqsRepairPersonnelworkList",labelText="人工记录",dataType = DataType.SUBLISTDATATYPE,relationIdName = "repairId")
    private List<EqsRepairPersonnelwork> eqsRepairPersonnelworkList;

    @TableField(exist = false)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairModule,propertyName = "eqsRepairResultrecords",ownerPropertyName = "eqsRepairResultrecords",labelText="结果记录",dataType = DataType.SUBLISTDATATYPE,relationIdName = "repairId")
    private List<EqsRepairResultrecord> eqsRepairResultrecords;


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getRequisitionId() {
        return requisitionId;
    }

    public void setRequisitionId(String requisitionId) {
        this.requisitionId = requisitionId;
    }

    public String getReceiverId() {
        return receiverId;
    }

    public void setReceiverId(String receiverId) {
        this.receiverId = receiverId;
    }

    public Date getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(Date receiveTime) {
        this.receiveTime = receiveTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getConfirmFinshTime() {
        return confirmFinshTime;
    }

    public void setConfirmFinshTime(Date confirmFinshTime) {
        this.confirmFinshTime = confirmFinshTime;
    }

    public String getConfirmerId() {
        return confirmerId;
    }

    public void setConfirmerId(String confirmerId) {
        this.confirmerId = confirmerId;
    }


    public EqsRepairRequistion getEqsRepairRequistion() {
        return eqsRepairRequistion;
    }

    public void setEqsRepairRequistion(EqsRepairRequistion eqsRepairRequistion) {
        this.eqsRepairRequistion = eqsRepairRequistion;
    }

    public User getReceiver() {
        return receiver;
    }

    public void setReceiver(User receiver) {
        this.receiver = receiver;
    }

    public User getConfirmer() {
        return confirmer;
    }

    public void setConfirmer(User confirmer) {
        this.confirmer = confirmer;
    }

    public List<EqsRepairPersonnelwork> getEqsRepairPersonnelworkList() {
        return eqsRepairPersonnelworkList;
    }

    public void setEqsRepairPersonnelworkList(List<EqsRepairPersonnelwork> eqsRepairPersonnelworkList) {
        this.eqsRepairPersonnelworkList = eqsRepairPersonnelworkList;
    }

    public List<EqsRepairResultrecord> getEqsRepairResultrecords() {
        return eqsRepairResultrecords;
    }

    public void setEqsRepairResultrecords(List<EqsRepairResultrecord> eqsRepairResultrecords) {
        this.eqsRepairResultrecords = eqsRepairResultrecords;
    }
}
